<?php

class Yapary_Webservice_Ebay_Price {

	private $arrData;


	public function __construct(array $_arrData) {
		$this->arrData	= $_arrData;
	}


	public function getPrice () {
		return (isset($this->arrData['Value'])) ? $this->getCurrency().$this->getPriceValue() : NULL;
	}


	public function getPriceValue () {
		return (isset($this->arrData['Value'])) ? number_format($this->arrData['Value'] + 0.00, 2) : NULL;
	}


	public function getCurrency () {
		switch ($this->getCurrencyName()) {
			case 'GBP':
				return '&pound;';
			case 'EUR':
				return '&euro;';
		}

		return $this->getCurrencyName();
	}


	public function getCurrencyName () {
		return (isset($this->arrData['CurrencyID'])) ? $this->arrData['CurrencyID'] : NULL;
	}


}

?>